package com.xy.biz.fd.domain.enums;

import com.xy.lang.domain.KeyValue;
import com.xy.lang.enums.LongCodeEnum;

/**
 * @author Greekn Zhang
 * @date 2021/12/1 9:28
 * @description
 */
public enum DocumentDefaultRepositoryEnum implements LongCodeEnum {
    CURRENT_REPOSITORY(1, "现行版质量管理体系文件、记录"),
    OBSOLETE_REPOSITORY(2, "作废版质量管理体系文件、记录"),
    AUDIT_REPOSITORY(3, "审核中质量管理体系文件、记录");

    private long code;
    private String name;

    DocumentDefaultRepositoryEnum(long code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public long getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public KeyValue<Long, String> toKeyValue() {
        return new KeyValue<>(this.code, this.name);
    }
}
